import { useSelector, useDispatch } from "react-redux";
import { setMenu } from "@store/modules/system";
import type { RootState } from "@/types/store.interface";

const useStore = () => {
  const dispatch = useDispatch();
  const systemStore = useSelector((state: RootState) => state.system);
  return {
    systemStore,
    setMenu: (menu: string) => dispatch(setMenu(menu)),
  };
};

export default useStore;
